package dxn.nl.file.biz.po;

import com.baomidou.mybatisplus.annotation.TableName;
import dxn.nl.file.biz.ImportStatusEnum;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.time.LocalDateTime;

/**
 * <p>
 *
 * </p>
 *
 * @author auto generator
 * @since 2021-09-08
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("file_import_detail")
public class FileImportFileDetail {
    private Long id;

    @Schema(title = "文件名称")
    private String fileName;

    @Schema(title = "文件路径")
    private String filePath;

    @Schema(title = "网点编号")
    private String orgCode;

    @Schema(title = "网点名称")
    private String orgName;

    @Schema(title = "文件类型编号")
    private String modeCode;

    @Schema(title = "文件类型名称")
    private String modeName;

    @Schema(title = "appId")
    private String appId;

    private String tag;

    @Schema(title = "导入时间")
    private LocalDateTime importTime;

    @Schema(title = "开始处理时间")
    private LocalDateTime startTime;

    @Schema(title = "处理结束时间")
    private LocalDateTime endTime;

    @Schema(title = "最后处理行数")
    private Integer lastDealRow;

    @Schema(title = "状态编号 0 导入成功 10 处理完成 20 推送mq ")
    private Integer statusCode;

    @Schema(title = "状态名称")
    public String getStatusName()
    {
        return ImportStatusEnum.getName(statusCode);
    }

    @Schema(title = "备注")
    private String remark;

    @Schema(title = "异常信息")
    private String message;

    @Schema(title = "导入人编号")
    private String importUserCode;

    @Schema(title = "导入人名称")
    private String importUserName;

    @Schema(title = "导入网点编号")
    private String importOrgCode;

    @Schema(title = "导入网点名称")
    private String importOrgName;

    private Long versionNo;
}
